<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>编辑用户信息</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/static/manager/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/static/manager/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/static/manager/css/animate.min.css" rel="stylesheet">
    <link href="/static/manager/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        
        
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>编辑用户资料</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal m-t">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">手机号：</label>
                                <div class="col-sm-8">
                                    <input name="u_phone" class="form-control" type="text" value="{$numcont.u_phone}">
                                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请输入用户手机号</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">昵称：</label>
                                <div class="col-sm-8">
                                    <input name="u_nick" class="form-control" type="text" value="{$numcont.u_nick}">
									<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请输入用户昵称</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">余额：</label>
                                <div class="col-sm-8">
                                    <input name="u_money" class="form-control" type="text" value="{$numcont.u_money}">
                                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 此处为用户余额</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户等级：</label>
                                <div class="col-sm-8">
                                    <input name="u_dengji" class="form-control" type="text" value="{$numcont.u_dengji}">
                                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 此处为用户等级</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">密码：</label>
                                <div class="col-sm-8">
                                    <input  name="u_pass" class="form-control" type="password">
									<span class="help-block m-b-none"><i class="fa fa-info-circle"></i>若不修改，则空着密码</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-8 col-sm-offset-3">
                                    <button class="btn btn-primary" type="button" id="tjbut">确定</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
       
    </div>
    <script src="/static/manager/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/manager/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/static/manager/js/content.min.js?v=1.0.0"></script>
    <script src="/static/manager/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="/static/manager/js/plugins/validate/messages_zh.min.js"></script>
    <script src="/static/manager/js/demo/form-validate-demo.min.js"></script>
    <script>
        $(document).ready(function(){
            $("#tjbut").click(function () {
                var u_id={$numcont.u_id};
                var u_phone=$("input[name='u_phone']").val();
                var u_nick=$("input[name='u_nick']").val();
                var u_money=$("input[name='u_money']").val();
                var u_dengji=$("input[name='u_dengji']").val();
                var u_pass=$("input[name='u_pass']").val();

                $.post("/manager/user/num_edit_do",{
                    u_id:u_id,
                    u_phone:u_phone,
                    u_nick:u_nick,
                    u_money:u_money,
                    u_pass:u_pass,
                    u_dengji:u_dengji
                },function(result){
                    if(result==200){
                        alert("信息更新成功！");
                        window.location.href = "/manager/user/index";
                    }else {
                        alert("信息更改失败！");
                    }
                });
            });
        });
    </script>
</body>

</html>